home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Harvest C / MPW Int & Lib / Interfaces / IOCtl.h < prev    next >
Text File  |  1991-04-17  |  1KB  |  53 lines

  1. /*
  2.     IOCtl.h -- Device-handler-specific requests
  3.  
  4.     Copyright, Apple Computer Inc. 1985-1988,1989,1990
  5.     All rights reserved.
  6. */
  7.  
  8. # ifndef __IOCTL__
  9. # define __IOCTL__
  10.  
  11. /*
  12.  *        ioctl() function prototype
  13.  */
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. int ioctl(int fildes, unsigned int cmd, long *arg);
  20.  
  21. #ifdef __cplusplus
  22. }
  23. #endif
  24.  
  25. /*
  26.  *   IO Control commands.
  27.  *
  28.  *   IOCTLs which begin with "FIO" are controls which are general
  29.  *          (device driver) control requests.  They may be executed by 
  30.  *         the top-level ioctl() procedure, or previewed by it before 
  31.  *         passing it on to the driver xxIoctl()s.
  32.  */
  33.  
  34. # define FIOLSEEK         (('f'<<8)|0x00)     /* Apple internal use only */
  35. # define FIODUPFD         (('f'<<8)|0x01)     /* Apple internal use only */
  36.  
  37. # define FIOINTERACTIVE (('f'<<8)|0x02)     /* If device is interactive */
  38. # define FIOBUFSIZE        (('f'<<8)|0x03)     /* Return optimal buffer size */
  39. # define FIOFNAME         (('f'<<8)|0x04)     /* Return filename */
  40. # define FIOREFNUM        (('f'<<8)|0x05)     /* Return fs refnum */
  41. # define FIOSETEOF        (('f'<<8)|0x06)     /* Set file length */
  42.  
  43. /*
  44.  *   IOCTLs which begin with "TIO" are for TTY (i.e., console or 
  45.  *         terminal-related) device control requests.
  46.  */
  47.  
  48. # define TIOFLUSH   (('t'<<8)|0x00)        /* discard unread input.  arg is ignored */
  49. # define TIOSPORT   (('t'<<8)|0x01)        /* Obsolete -- do not use */
  50. # define TIOGPORT   (('t'<<8)|0x02)        /* Obsolete -- do not use */
  51.  
  52. # endif __IOCTL__
  53.